package com.joysuch.wwyt.bp.repository;

import com.joysuch.wwyt.bp.entity.BpEmergencyContingencyPlan;
import com.joysuch.wwyt.bp.entity.BpEmergencyContingencyPlans;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

import java.util.List;

public interface BpEmergencyContingencyPlansDao extends JpaRepository<BpEmergencyContingencyPlans, Long>, QuerydslPredicateExecutor<BpEmergencyContingencyPlans> {

    public Page<BpEmergencyContingencyPlans> findAll(Specification<BpEmergencyContingencyPlans> spec, Pageable pageable);

    List<BpEmergencyContingencyPlans> findByName(String name);

    List<BpEmergencyContingencyPlans> findByState(int id);
}
